#ifndef EMAIL_H
#define EMAIL_H
#include<QRegularExpression>
#include<QRegularExpressionMatch>
#include"verifycode.h"
#include "smtp.h"
//TODO combine email 与code 类

class Email
{
private:
    QString name;
    QString server;
    static QRegularExpression pattern;
    static QRegularExpression obj;
//    static SMTP admin;
public:
    //TODO 改密码
    VerifyCode* code;
    void SendCode();
    void SendEmail(QString title,QString content);
    QString GetName();
    QString GetServer();
    QByteArray GetByteName();
    Email(QString n);
    bool check_email();
    ~Email();
};
#endif // EMAIL_H
